﻿<%@ Page Title="" Language="C#" MasterPageFile="../masterpages/umbracoPage.Master"
    AutoEventWireup="true" CodeBehind="ViewBusinessIdentityProviders.aspx.cs" Inherits="umbraco.ViewBusinessIdentityProviders" %>

<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>

<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
    <cc1:UmbracoPanel ID="MainPanel" runat="server">
        <cc1:Pane runat="server">
            <div class="dashboardWrapper">
                <h2 style="padding-left:55px;">Access Control Service Extensions for Umbraco</h2>
                <img class="dashboardIcon" alt="Umbraco" src="/umbraco/dashboard/images/acsExtensionsLogo49x32.png"></img>
                <h3>Authorization settings for Business Identity Providers</h3>
                <p>
                    Use this section to establish how you want to authorize members coming from the business identity providers configured in your ACS namespace. You can add or remove business identity providers in the ACS management portal at the page <a target="_blank" href="https://<%=System.Web.Configuration.WebConfigurationManager.AppSettings["AcsNamespace"]%>.accesscontrol.windows.net/v2/mgmt/web/IdentityProvider">https://<%=System.Web.Configuration.WebConfigurationManager.AppSettings["AcsNamespace"]%>.accesscontrol.windows.net/v2/mgmt/web/IdentityProvider</a>.
                </p>
                <p>
                    Defining a policy is very simple: you tell Umbraco that if a member comes from a given identity provider carrying a certain claim type, it should be considered as belonging to your Member Group of choice.
                </p>
                <p>
                    The tree on the right contains all the configured identity providers, each containing a list of all the member groups: in order to create a new policy rule, select the identity provider of choice, navigate to the member group you want to assign, right click on it and choose “Create”.
                </p>
            </div>
            <asp:panel runat="server" ID="WarningsPanel" CssClass="error">
                <asp:panel runat="server" ID="NoManagementKeyPanel">
                    <ul>
                        <li>
                            You need to configure programmatic access to ACS before you can create access policies for business identity providers. Go to <a target="_blank" href="/install/?installStep=ACSExtensions">ACS Extensions setup page</a> and provide your ACS management key.
                        </li>
                    </ul>
                </asp:panel>
                <asp:panel runat="server" ID="NoMemberGroupPanel">
                    <ul>
                        <li>
                            You need to create at least a membergroup before you can create access policies for business identity providers.
                        </li>
                    </ul>
                </asp:panel>
                <asp:panel runat="server" ID="NoIdentityProviderPanel">
                    <ul>
                        <li>
                            Your ACS namespace does not have any business identity provider configured. To add an identity provider, navigate to the ACS management portal at the page <a target="_blank" href="https://<%=System.Web.Configuration.WebConfigurationManager.AppSettings["AcsNamespace"]%>.accesscontrol.windows.net/v2/mgmt/web/IdentityProvider">https://<%=System.Web.Configuration.WebConfigurationManager.AppSettings["AcsNamespace"]%>.accesscontrol.windows.net/v2/mgmt/web/IdentityProvider</a>.
                        </li>
                    </ul>
                </asp:panel>
            </asp:panel>

            <asp:panel runat="server" ID="BusinessIdentityProvidersPanel">
                <h3>Business Identity Providers</h3>
                <asp:Repeater ID="IdentityProvidersRepeater" runat="server">
                    <HeaderTemplate><ul></HeaderTemplate>
                    <ItemTemplate>
                        <li>
                            <a href="ViewBusinessIdentityProviderMappings.aspx?identityProviderId=<%# Eval("Id") %>&identityProviderName=<%# Eval("Name") %>">
                                <%# Eval("Name") %>
                            </a>
                        </li>
                    </ItemTemplate>
                    <FooterTemplate></ul></FooterTemplate>
                </asp:Repeater>
            </asp:panel>
        </cc1:Pane>
    </cc1:UmbracoPanel>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="footer" runat="server">
</asp:Content>